package com.zhixiang.xaec.service.demo.impl;


import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zhixiang.core.dao.BaseDao;
import com.zhixiang.core.service.impl.BaseServiceImpl;
import com.zhixiang.xaec.dao.demo.DemoDao;
import com.zhixiang.xaec.entity.demo.Demo;
import com.zhixiang.xaec.service.demo.DemoService;


@Service
//@Service("demoService")
public class DemoServiceImpl extends BaseServiceImpl<Demo,Integer> implements DemoService
{
//    @Autowired  //按类型注入
//    @Resource(name="demoDao") //按名字注入
    @Resource(type=DemoDao.class)
    public void setBaseDao(BaseDao<Demo,Integer> demoDao)
    {
        setDao(demoDao);
    }

    public void test(){
        ((DemoDao)getDao()).eat();
    }
    
}
